From: Philipp Stephani Date: Sat, 30 Sep 2017 18:40:02 +0000 (+0200) Subject: * src/editfns.c (Fchar_after): Small optimization. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~19^2~6661 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=66d37175ecac41dfb2f854dbb148dcc7ca87b345;p=emacs.git * src/editfns.c (Fchar_after): Small optimization. --- diff --git a/src/editfns.c b/src/editfns.c index e326604467c..4dcf7cbe6ef 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1256,10 +1256,10 @@ If POS is out of range, the value is nil. */) if (NILP (pos)) { pos_byte = PT_BYTE; - XSETFASTINT (pos, PT); + if (pos_byte < BEGV_BYTE || pos_byte >= ZV_BYTE) + return Qnil; } - - if (MARKERP (pos)) + else if (MARKERP (pos)) { pos_byte = marker_byte_position (pos); if (pos_byte < BEGV_BYTE || pos_byte >= ZV_BYTE)